package com.job.ming.Zuoye0712;

import java.util.Scanner;

/**
 * @author Yangmingyu
 * @version 1.0
 * @since 2022-07-12 19:33:38
 */
public class Testit {
    public static void main(String[] args) {
        Laohu laohu=new Laohu();
        Scanner a=new Scanner(System.in);
        System.out.println("输入老虎遭遇的敌害:1 2");
        String s=a.next();

        while (!s.equals("exit")){
            laohu.attact=Method.Method(s);
            if (laohu.attact!=null){
                laohu.Attack();
            }else{
                Attact attact=new Attact() {
                    @Override
                    public void attack() {
                        System.out.println("不攻击");
                    }
                };
               attact.attack();
            }
            s=a.next();
        }
    }
}
